home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 May / 1984-05.d64 / memo writer_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  73 lines

  1. 9 gosub500
  2. 10 poke204,0:gosub800:poke650,128:sp=1
  3. 20 geta$:ifa$=""then20
  4. 22 ifa$=chr$(34)then20
  5. 25 ifa$="[147]"thengosub800:a$="":goto20
  6. 30 ifasc(a$)<141andasc(a$)>132thengosub100
  7. 32 ifa$=""then20
  8. 35 ifasc(a$)=13and(peek(210)=7)and(peek(209)>151)then20
  9. 40 poke205,3:wait207,1:printa$;
  10. 50 ifpeek(210)=7and(peek(209)+peek(211)>191)thenpoke205,3:wait207,1:print"[145]";
  11. 60 goto20
  12. 100 x=0
  13. 110 ifa$="[133]"thenx=5
  14. 120 ifa$="[134]"thenx=10
  15. 130 ifa$="[135]"thenx=15
  16. 140 ifa$="[136]"thenx=20
  17. 150 ifa$="[137]"thenx=25
  18. 160 ifx>0thena$="":forq=1tox:a$=a$+"":nextq:return
  19. 170 ifa$="[138]"thenifsp=1thensp=2:poke1984,178:poke56256,1:return
  20. 175 ifa$="[138]"thensp=1:poke1984,177:poke56256,1:return
  21. 180 ifa$="[139]"theng1=984:tf=14:rw=23:cl=40:rem expanded
  22. 190 ifa$="[140]"theng1=944:tf=15:rw=11:cl=80:rem normal
  23. 200 a$=""
  24. 210 gosub60000
  25. 220 return
  26. 500 poke53281,0:poke53280,2
  27. 510 print"[147]memo writer"
  28. 530 print"this is a screen-oriented"
  29. 540 print"word processing program"
  30. 550 print"using the commodore-64's"
  31. 560 print"own built-in editing"
  32. 570 print"capabilities."
  33. 590 print"hit any key for list of control keys"
  34. 600 poke198,0
  35. 610 geta$:ifa$=""then610
  36. 620 print"[147]f1 f3 f5 f7 f2     tab from current"
  37. 630 print"position in incre-"
  38. 640 print"ments of five."
  39. 645 print"f4        set single or double space"
  40. 650 print"f6        print expanded"
  41. 660 print"characters"
  42. 670 print"f8        print in normal size"
  43. 680 print"characters."
  44. 690 print"all editing keys work as normal."
  45. 700 print"text cannot scroll past end of screen."
  46. 710 print"you may type in cursor-up or"
  47. 720 print"cursor-down mode; the print"
  48. 730 print"routine will automatically"
  49. 740 print"set the print mode correctly."
  50. 750 print"hit any key to begin"
  51. 760 poke198,0
  52. 770 geta$:ifa$=""then770
  53. 780 return
  54. 800 poke53281,1:print"[147]>";:poke53281,0:forx=1to11:print"[157]>";:nextx
  55. 810 print"[157] [183][183][183][183][183][183][183][183][183][183][183][183][183]memo writer[146][183][183][183][183][183][183][183][183][183][183][183][183][183][183]";
  56. 820 return
  57. 60000 q=peek(53272):ifq=21theng1$=chr$(145):goto60010
  58. 60005 g1$=chr$(17)
  59. 60010 g1$=g1$+chr$(tf)
  60. 60020 open4,4:wait207,1:poke204,255
  61. 60030 forg0=0torw:g0$=g1$:g1=g1+cl
  62. 60040 forg2=g1tog1+(cl-1):g3=peek(g2)
  63. 60050 ifg3>128theng3=g3-128:g4=1:g0$=g0$+chr$(18)
  64. 60060 if(g3>0)*(g3<32)theng3=g3+64:goto60100
  65. 60070 if(g3>31)*(g3<64)then60100
  66. 60080 if(g3>63)*(g3<96)theng3=g3+128:goto60100
  67. 60090 if(g3>95)*(g3<128)theng3=g3+64:goto60100
  68. 60100 g0$=g0$+chr$(g3)
  69. 60110 ifg4=1theng0$=g0$+chr$(146):g4=0
  70. 60120 nextg2:print#4,g0$:ifsp=2thenprint#4
  71. 60130 nextg0:close4:poke204,0
  72. 60140 return
  73.